﻿using AutoMapper;
using MovieDB.Common;
using MovieDB.DTOs;

namespace MovieDB.Mapping.CustomConverter
{
    internal class VideoQualityStringResolver : ValueResolver<MovieDto, string>
    {
        protected override string ResolveCore(MovieDto source)
        {
            VideoQualityDto videoQuality = source.VideoQuality;

            if(videoQuality == null)
            {
                return string.Empty;
            }

            return string.Format("{0} - {1}", videoQuality.VideoType.GetEnumDescription(), videoQuality.VideoResolution.GetEnumDescription());
        }
    }
}